<template>
	<view >
		<view style="padding: 30rpx">
			<center><small>可提现余额(元)</small></center>
			<center style="font-size: 52rpx; font-weight: bold;" v-text="account.amount" >5200.00</center>
		</view>
		<view>
			<uni-row style="text-align: center;padding: 30rpx">
				<uni-col :span="8">
					<view><small>近30天收入(元)</small></view>
					<view v-text="account.monthAmount"></view>
				</uni-col>
				<uni-col :span="8" >
					<view><small>累计收入(元)</small></view>
					<view v-text="account.tatalAmount"></view>
				</uni-col>
				<uni-col :span="8">
					<view><small>待入账(元)</small></view>
					<view v-text="account.waitEntryAmount"></view>
				</uni-col>
			</uni-row>
			<view style="text-align: center;">
				<button  type="primary" size="mini" style="margin: 20rpx; width: 300rpx;" @click="toCashOut">去提现</button>
			</view>
			<view @click="toBill()" >
				<uni-row>
					<uni-col :span="4">
						<image src="/static/wallet/wdqb_icon_lszd.png" style="width: 60rpx; height: 60rpx;"></image>
					</uni-col>
					<uni-col :span="16" >
						流水账单
					</uni-col>
				</uni-row>
			</view>
			<view @click="toCard()" >
				<uni-row>
					<uni-col :span="4">
						<image src="/static/wallet/wdqb_icon_yhk.png" style="width: 60rpx; height: 60rpx;"></image>
					</uni-col>
					<uni-col :span="16" >
						银行卡
					</uni-col>
				</uni-row>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				account:{}
			}
		},
		onLoad() {
			// 查询账户信息
			uni.request({
				url: 'http://120.46.197.40:8080/api/userAccount/getUserAccountInfo',
				method: 'GET',
				data: {
					userId: this.userId
				},
				header: {
					'content-type': 'application/x-www-form-urlencoded'
				},
				success: (res) => {
					
					this.account = res.data.data;
					
				}
			});
		},
		methods: {
			toBill(){
				uni.navigateTo({
					url:"/pages/home/wallet/bill"
				})
			},
			toCard(){
				uni.navigateTo({
					url:"/pages/home/wallet/card"
				})
			},
			toCashOut(){
				uni.navigateTo({
					url:"/pages/home/wallet/cashOut"
				})
			}
		}
	}
</script>

<style>

</style>
